/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package iteso.compiladores.logo;

import java.awt.Color;
import java.awt.Point;

/**
 *
 * @author GTWAVALON
 */
public class Coordenadas extends Point
{
	private boolean penDown;
	private Color linecolor;
	private int radio;
	private int anguloInicio;
	private int anguloFinal;
	private int size;


	private static final long serialVersionUID = 1L;
	public Coordenadas(int x, int y)
	{
		super(x,y);
		linecolor = Helper.penColor;
		penDown = Helper.penDown;
		size = Helper.penSize;
	}
	public Coordenadas(double x, double y)
	{
		this((int)x, (int)y);
	}	
	public Coordenadas(int x, int y, boolean penDown)
	{
		this(x,y);
		this.penDown = penDown;
	}
	public Coordenadas(int x, int y, Color color)
	{
		this(x,y);
		linecolor = color;
	}
	
	public Coordenadas(int x, int y,  int radio, int anguloInicio, int anguloFinal)
	{
		this(x,y);
		this.radio = radio*2;
		this.anguloInicio = 90-anguloInicio;//90° porque se mide apartir del eje y no del x
		this.anguloFinal = -anguloFinal;
	}
	public boolean isPenDown() {
		return penDown;
	}
	public void setPenDown(boolean penDown) {
		this.penDown = penDown;
	}
	public Color getLinecolor() {
		return linecolor;
	}
	public void setLinecolor(Color linecolor) {
		this.linecolor = linecolor;
	}
	public int X() {return (int)super.getX();}
	public int Y() {return (int)super.getY();}
	public int getRadius(){return radio;}
	public int getAngleStart(){return anguloInicio;}
	public int getAngleEnd(){return anguloFinal;}
	public int getSize() {
		return size;
	}
	public void setSize(int size) {
		this.size = size;
	}
	public String toString()
	{return "[x="+getX()+",y="+getY()+"]"+"r="+radio+"a="+anguloInicio+","+anguloFinal;}
}